home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ Aug 89 / X0019-scrolling and offsc-Aug89 < prev    next >
Encoding:
Text File  |  1989-08-22  |  1.6 KB  |  38 lines  |  [TEXT/GEOL]

  1. Item    8611967                         5-Aug-89        12:02
  2.  
  3. From:   D4132                           Farallon, R & D, PRT
  4.  
  5. To:     MACAPP.TECH$                    MACAPP Tech
  6.  
  7. cc:     MOOF        D4132 MACDTS        Rollin, Keith A, APL
  8.  
  9. Sub:    scrolling and offscreens
  10.  
  11. I’m trying to figure out the best way to integrate MacApp’s implementation of
  12. scrolling with an application that requires the use of offscreen bitmaps. The
  13. document I’m trying to display is, in general, too large to keep an offscreen
  14. bitmap of the whole thing, so my offscreen is only as large as the window,
  15. which means it has to be scrolled and updated.
  16.  
  17. The obvious solution is just to overide TScroller.ScrollDraw to scroll my
  18. offscreen and then blit it to the screen.  I’m reluctant to do this since
  19. ScrollDraw is a rather low-level method which, according to the manual is
  20. “...rarely overridden, and even more rarely called from application code.” It’s
  21. sort of reminiscent of patching traps: for a while everyone did it, then it was
  22. discouraged, frowned upon, and finally almost outlawed.
  23.  
  24. So my question is two-fold:  1) Is it bad karma to overide low-level methods
  25. such as ScrollDraw? and if so, 2) what’s a better way to accomplish the desired
  26. result?
  27.  
  28. One solution I thought about was switching bitmaps behind ScrollDraw’s back, so
  29. that it would actually scroll my offscreen for me. Part of the problem with
  30. this is that it eventually calls my Draw method which has to figure out that a
  31. portion of the offscreen actually needs redrawing. Ideally, you just want the
  32. Draw method to be a CopyBits call.
  33.  
  34. Joe Sensendorf
  35. Farallon Computing
  36. D4132
  37.  
  38.